﻿import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import ConfigElementType 1.0
import "qrc:/qmlComponents/ConfigManager"
import "qrc:/qmlComponents/AxisModulePos"
import "qrc:/qmlComponents/VisionViewer"
import "qrc:/qmlComponents/CustomizedUIElement/RowColumnSelectorView"
Item {
    ColumnLayout{
        spacing: 30
        RowColumnSelector{
            rowColInfo: stRowColInfo
        }

        XYZModulePos{
            moduleName: "SUTXYZ"
            posName: "UnloadOkProductPos"
        }

        RowLayout{
            SAxisModulePos{
                moduleName: "PickArmY"
                posName: "PickOKProductPos"
            }

            SAxisModulePos{
                moduleName: "PickerZ2"
                posName: "PickOKProductPos"
            }

            Button{
                text: qsTr("Get_OK_Product")
                onClicked: {
                    tem.runSingleCmd(pickArm, "moveToGetOKProduct")
                }
            }
        }

        RowLayout{

            XYModulePos{
                moduleName: "PickArmXY"
                posName: "PlaceOKProductPos"
            }

            SAxisModulePos{
                moduleName: "PickerZ2"
                posName: "PlaceOKProductPos"
            }

            Button{
                text: qsTr("Place_OK_Product")
                onClicked: {
                    tem.runSingleCmd(pickArm, "moveToPlaceOKProduct",
                                     [stRowColInfo.row, stRowColInfo.column, stRowColInfo.unitRow, stRowColInfo.unitColumn])
                }
            }
        }
    }
}
